package com.caine.etcd.tool;

import java.util.Collection;

public class StringTool {

    public static boolean isNullOrEmpty(Object obj) {
        if (obj == null || obj.toString().trim().equals("")) return true;
        return false;
    }

    public static boolean isCollectionNull(Object obj) {
        if (obj == null) return true;
        if (obj instanceof Collection) {
            Collection collection = (Collection) obj;
            if (collection == null || collection.size() <= 0)
                return true;
        }
        return false;
    }
}
